home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / ABUSESRC.ZIP / AbuseSrc / macabuse / imlib / include / jmalloc.hpp < prev    next >
C/C++ Source or Header  |  1997-05-20  |  755b  |  43 lines

  1. #ifndef __jmalloc_hpp_
  2. #define __jmalloc_hpp_
  3.  
  4.  
  5. #include <stdlib.h>
  6.  
  7. #ifdef MANAGE_MEM
  8.  
  9.  
  10. #ifdef MEM_CHECK
  11. #include <stdlib.h>
  12. extern void *operator new( size_t size, char *file, unsigned long line);
  13. #define new new(__FILE__,__LINE__)
  14. #endif
  15.  
  16.  
  17. enum {ALLOC_SPACE_STATIC,ALLOC_SPACE_CACHE};
  18. extern int alloc_space;
  19. void *jmalloc(long size, char *what_for);
  20. void *jrealloc(void *ptr, long size, char *what_for);
  21. void jfree(void *ptr);
  22. void mem_report(char *filename);
  23. void jmalloc_init(long min_size);
  24. void jmalloc_uninit();
  25. long j_allocated();
  26. long j_available();
  27. extern void free_up_memory();
  28. #else
  29. #define jmalloc(x,y) malloc(x)
  30. #define jrealloc(x,y,z) realloc(x,y)
  31. #define jfree(x) free(x)
  32. #endif
  33.  
  34.  
  35.  
  36.  
  37. #endif
  38.  
  39.  
  40.  
  41.  
  42.  
  43.